package com.yxzx.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MybatisPlusConfig {
    @Bean
    public PaginationInterceptor paginationInterceptor(){

        PaginationInterceptor interceptor=new PaginationInterceptor();
        //限制恶意查询：前端传来的pagesize=一亿

        //设置每页的最大数 默认500 -1 代表不受限制
        interceptor.setLimit(100);
        return interceptor;
    }
}
